package com.base.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.base.mapper.voipmapper.CompanyNewsMapper;
import com.base.po.voip.CompanyNews;
import com.base.po.voip.CompanyNewsExample;
import com.base.service.CompanyNewsService;
import com.base.utils.Page;


@Service("companyNewsService")
public class CompanyNewsServiceImpl implements CompanyNewsService {
	@Autowired
	private CompanyNewsMapper companyNewsMapper;

	@Override
	public int countByExample(CompanyNewsExample example) {
		
		return companyNewsMapper.countByExample(example);
	}

	@Override
	public int deleteByExample(CompanyNewsExample example) {
		
		return companyNewsMapper.deleteByExample(example);
	}

	@Override
	public int deleteByPrimaryKey(String id) {
		
		return companyNewsMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(CompanyNews record) {
		
		return companyNewsMapper.insert(record);
	}

	@Override
	public int insertSelective(CompanyNews record) {
		
		return companyNewsMapper.insertSelective(record);
	}

	@Override
	public List<CompanyNews> selectByExample(CompanyNewsExample example) {
		
		return companyNewsMapper.selectByExample(example);
	}

	@Override
	public CompanyNews selectByPrimaryKey(String id) {
		
		return companyNewsMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByExampleSelective(CompanyNews record, CompanyNewsExample example) {
		
		return companyNewsMapper.updateByExampleSelective(record, example);
	}

	@Override
	public int updateByExample(CompanyNews record, CompanyNewsExample example) {
		
		return companyNewsMapper.updateByExample(record, example);
	}

	@Override
	public int updateByPrimaryKeySelective(CompanyNews record) {
		
		return companyNewsMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(CompanyNews record) {
		
		return companyNewsMapper.updateByPrimaryKey(record);
	}

	@Override
	public List<CompanyNews> selectByAll(Page page, String parentid, String receiveid, String timeFrom,
			String timeTo,String username,String title) {
		
		return companyNewsMapper.selectByAll(page, parentid, receiveid, timeFrom, timeTo, username, title);
	}

	@Override
	public int countByAll(String parentid, String receiveid, String timeFrom, String timeTo,String username,
			String title) {
		
		return companyNewsMapper.countByAll(parentid, receiveid, timeFrom, timeTo, username, title);
	}

	@Override
	public List<CompanyNews> selectByParentid(Page page, String id, String parentid, String receiveid, String timeFrom,
			String timeTo,String username,String title) {
		
		return companyNewsMapper.selectByParentid(page, id, parentid, receiveid, timeFrom, timeTo, username, title);
	}

	@Override
	public int countByParentid(String id, String parentid, String receiveid, String timeFrom, String timeTo,String username,
			String title) {
		
		return companyNewsMapper.countByParentid(id, parentid, receiveid, timeFrom, timeTo, username, title);
	}

	@Override
	public List<CompanyNews> selectByShopidNotAll(Page page, String id, String parentid, String receiveid,
			String timeFrom, String timeTo,String username,String title) {
		
		return companyNewsMapper.selectByShopidNotAll(page, id, parentid, receiveid, timeFrom, timeTo, username, title);
	}

	@Override
	public int countByShopidNotAll(String id, String parentid, String receiveid, String timeFrom, String timeTo,String username,
			String title) {
		
		return companyNewsMapper.countByShopidNotAll(id, parentid, receiveid, timeFrom, timeTo, username, title);
	}

	@Override
	public List<CompanyNews> selectByRoleTOne(String adminid,String parentid) {
		
		return companyNewsMapper.selectByRoleTOne(adminid,parentid);
	}

	@Override
	public List<CompanyNews> selectByRoleTwo(String adminid,String parentid, String shopid) {
		
		return companyNewsMapper.selectByRoleTwo(adminid,parentid, shopid);
	}
}
